package com.mmx.baseservice.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author mmx generator
 * @since 2021-07-28
 */
@ApiModel(value="UsInfo对象", description="用户信息表")
public class UsInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "管理员id")
    private Long adId;

    @ApiModelProperty(value = "身份证")
    private String idCardNum;

    @ApiModelProperty(value = "出生日期")
    private Date dateOfBirth;

    @ApiModelProperty(value = "联系方式")
    private String phone;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "0男 1女")
    private Integer sex;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "真实地址")
    private String address;

    @ApiModelProperty(value = "电子邮箱")
    private String email;

    @ApiModelProperty(value = "微信唯一openId")
    private String openId;

    @ApiModelProperty(value = "微信昵称")
    private String nick;

    @ApiModelProperty(value = "前缀")
    private String prefix;

    @ApiModelProperty(value = "真实姓名")
    private String name;

    private Date createTime;

    public Long getId() {
        return id;
    }

    public UsInfo setId(Long id) {
        this.id = id;
        return this;
    }
    public Long getAdId() {
        return adId;
    }

    public UsInfo setAdId(Long adId) {
        this.adId = adId;
        return this;
    }
    public String getIdCardNum() {
        return idCardNum;
    }

    public UsInfo setIdCardNum(String idCardNum) {
        this.idCardNum = idCardNum;
        return this;
    }
    public Date getDateOfBirth() {
        return dateOfBirth;
    }

    public UsInfo setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
        return this;
    }
    public String getPhone() {
        return phone;
    }

    public UsInfo setPhone(String phone) {
        this.phone = phone;
        return this;
    }
    public String getPassword() {
        return password;
    }

    public UsInfo setPassword(String password) {
        this.password = password;
        return this;
    }
    public Integer getSex() {
        return sex;
    }

    public UsInfo setSex(Integer sex) {
        this.sex = sex;
        return this;
    }
    public String getAvatar() {
        return avatar;
    }

    public UsInfo setAvatar(String avatar) {
        this.avatar = avatar;
        return this;
    }
    public String getAddress() {
        return address;
    }

    public UsInfo setAddress(String address) {
        this.address = address;
        return this;
    }
    public String getEmail() {
        return email;
    }

    public UsInfo setEmail(String email) {
        this.email = email;
        return this;
    }
    public String getOpenId() {
        return openId;
    }

    public UsInfo setOpenId(String openId) {
        this.openId = openId;
        return this;
    }
    public String getNick() {
        return nick;
    }

    public UsInfo setNick(String nick) {
        this.nick = nick;
        return this;
    }
    public String getPrefix() {
        return prefix;
    }

    public UsInfo setPrefix(String prefix) {
        this.prefix = prefix;
        return this;
    }
    public String getName() {
        return name;
    }

    public UsInfo setName(String name) {
        this.name = name;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsInfo setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }

    public static final String ID = "id";

    public static final String AD_ID = "ad_id";

    public static final String ID_CARD_NUM = "id_card_num";

    public static final String DATE_OF_BIRTH = "date_of_birth";

    public static final String PHONE = "phone";

    public static final String PASSWORD = "password";

    public static final String SEX = "sex";

    public static final String AVATAR = "avatar";

    public static final String ADDRESS = "address";

    public static final String EMAIL = "email";

    public static final String OPEN_ID = "open_id";

    public static final String NICK = "nick";

    public static final String PREFIX = "prefix";

    public static final String NAME = "name";

    public static final String CREATE_TIME = "create_time";

    @Override
    public String toString() {
        return "UsInfo{" +
            "id=" + id +
            ", adId=" + adId +
            ", idCardNum=" + idCardNum +
            ", dateOfBirth=" + dateOfBirth +
            ", phone=" + phone +
            ", password=" + password +
            ", sex=" + sex +
            ", avatar=" + avatar +
            ", address=" + address +
            ", email=" + email +
            ", openId=" + openId +
            ", nick=" + nick +
            ", prefix=" + prefix +
            ", name=" + name +
            ", createTime=" + createTime +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsInfo.ID
            ,UsInfo.AD_ID
            ,UsInfo.ID_CARD_NUM
            ,UsInfo.DATE_OF_BIRTH
            ,UsInfo.PHONE
            ,UsInfo.PASSWORD
            ,UsInfo.SEX
            ,UsInfo.AVATAR
            ,UsInfo.ADDRESS
            ,UsInfo.EMAIL
            ,UsInfo.OPEN_ID
            ,UsInfo.NICK
            ,UsInfo.PREFIX
            ,UsInfo.NAME
            ,UsInfo.CREATE_TIME
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}